<template>
  <div class="home">
    <button @click="goSignin">去签到</button>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'home',
  data() {
    return {
    }
  },
  methods: {
    goSignin() {
      // 登录以后才能去签到
      if (localStorage.user) {
        this.$router.push('/signin')
      } else {
        alert('请登录')
      }
    }
  },
}
</script>
